﻿using System.Collections.Generic;
using Orchard.Environment.Extensions.Models;
using Orchard.Security.Permissions;

namespace Vitus.Featured
{
    public class FeaturedPermissions : IPermissionProvider
    {
        public static readonly Permission ManageFeatured = new Permission { Description = "Manage Featured Content", Name = "ManageFeatured" };

        public virtual Feature Feature { get; set; }

        public IEnumerable<Permission> GetPermissions()
        {
            return new[]
            {
                ManageFeatured
            };
        }

        public IEnumerable<PermissionStereotype> GetDefaultStereotypes()
        {
            return new[]
            {
                new PermissionStereotype
                {
                    Name = "Administrator",
                    Permissions = new[] { ManageFeatured }
                },

                new PermissionStereotype
                {
                    Name = "Editor",
                    Permissions = new[] { ManageFeatured }
                }
            };
        }

    }
}